# Django settings for image_server project.
#!/usr/bin/env python
# -*- coding:utf-8 -*- #

DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    # ('Your Name', 'your_email@example.com'),
)

MANAGERS = ADMINS

WEB_ROOT = 'D:/workspace/image-server'

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': '%s/db/sqlite.db' % WEB_ROOT,                      # Or path to database file if using sqlite3.
        'USER': '',                      # Not used with sqlite3.
        'PASSWORD': '',                  # Not used with sqlite3.
        'HOST': '',                      # Set to empty string for localhost. Not used with sqlite3.
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
    }
}

TIME_ZONE = 'Asia/Shanghai'
LANGUAGE_CODE = 'zh-cn'
SITE_ID = 1

USE_I18N = True
USE_L10N = True

MEDIA_ROOT = WEB_ROOT
MEDIA_URL = ''

STATIC_ROOT = ''
STATIC_URL = '/static/'

ADMIN_MEDIA_PREFIX = '/static/admin/'

STATICFILES_DIRS = (
)

STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
#    'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

SECRET_KEY = 'nj_ggz7=l3o31yespjp(u)j%78a12m43u$r5v-czmbat1r8m2)'

TEMPLATE_LOADERS = (
)

MIDDLEWARE_CLASSES = (
    'django.middleware.common.CommonMiddleware',
    #'django.contrib.sessions.middleware.SessionMiddleware',
    #'django.contrib.messages.middleware.MessageMiddleware',
    'popcan.middleware.commons.PatchRequestMiddleware',
    'popcan.middleware.commons.LogRequestMiddleware',
    'popcan.middleware.exceptions.ExceptionMiddleware'
)

ROOT_URLCONF = 'popcan.core.urls'

TEMPLATE_DIRS = (
)

INSTALLED_APPS = (
    
)

USER_SETTINGS = {
    'UPLOAD_URL_PREFIX': '/upload/',
    'UPLOAD_ROOT': '%s/upload/' % WEB_ROOT,
    'UPLOAD_MAX_SIZE': 20 * 1024 * 1024
}

CACHE_BACKEND = "memcached://127.0.0.1:11211/"
